#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTcpServer>
#include<QTcpSocket>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
    void InitWidget();
    void StartConnect();
private slots:
    void OnNewConnection();
    void OnReadReady();
private:
    Ui::Widget *ui;
    QTcpServer *m_pServer;
    QTcpSocket *m_pSocket;
};

#endif // WIDGET_H
